//
//  FoodListTableViewCell.m
//  FaceRecognition
//
//  Created by syun on 2018/1/31.
//  Copyright © 2018年 Sylar. All rights reserved.
//

#import "FoodListTableViewCell.h"

@implementation FoodListTableViewCell

-(instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    if (self = [super initWithStyle:style reuseIdentifier:reuseIdentifier]) {
        
        _foodImage = [[UIImageView alloc]initWithFrame:CGRectMake(15, 20, 90, 90)];
        _foodImage.layer.cornerRadius = 45;
        _foodImage.clipsToBounds = YES;
        [self.contentView addSubview:_foodImage];
        
        _foodTypeLable = [[UILabel alloc]initWithFrame:CGRectMake(CGRectGetMaxX(_foodImage.frame)+15,30, 150, 20)];
        _foodTypeLable.font = [UIFont systemFontOfSize:16];
        _foodTypeLable.textColor = [UIColor colorWithHexString:@"343334"];
        [self.contentView addSubview:_foodTypeLable];
        
        _foodNameLable = [[UILabel alloc]initWithFrame:CGRectMake(CGRectGetMaxX(_foodImage.frame)+15,CGRectGetMaxY(_foodTypeLable.frame)+20,SCREENWIDTH - 130 - 30 - 90 - 30, 20)];
        _foodNameLable.font = [UIFont systemFontOfSize:14];
        _foodNameLable.textColor = [UIColor colorWithHexString:@"d8d8d9"];
        [self.contentView addSubview:_foodNameLable];
        
        UIView * line = [[UIView alloc]initWithFrame:CGRectMake(15, 129, SCREENWIDTH - 130 - 15, 1)];
        line.backgroundColor = [UIColor colorWithHexString:@"dedede"];
        [self.contentView addSubview:line];
    }
    
    return self;
}
- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
